home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / dev / gcc / gcc263_doc.lha / gnu / man / man1 / make.1 < prev    next >
Text File  |  1994-12-19  |  10KB  |  265 lines

  1.  
  2.  
  3.  
  4. MAKE(1L)               LOCAL USER COMMANDS               MAKE(1L)
  5.  
  6.  
  7. NNAAMMEE
  8.        make - GNU make utility to maintain groups of programs
  9.  
  10. SSYYNNOOPPSSIISS
  11.        mmaakkee [ --ff makefile ] [ option ] ...  target ...
  12.  
  13. WWAARRNNIINNGG
  14.        This  man  paage is an extract of the documentation of _G_N_U
  15.        _m_a_k_e _.  It is updated only occasionally, because  the  GNU
  16.        project  does  not use nroff.  For complete, current docu-
  17.        mentation, refer to the Info file mmaakkee  or  the  DVI  file
  18.        mmaakkee..ddvvii  which  are  made  from  the  Texinfo source file
  19.        mmaakkee..tteexxiinnffoo.
  20.  
  21. DDEESSCCRRIIPPTTIIOONN
  22.        The purpose of the _m_a_k_e utility is to determine  automati-
  23.        cally  which  pieces  of a large program need to be recom-
  24.        piled, and issue the commands  to  recompile  them.   This
  25.        manual describes the GNU implementation of _m_a_k_e, which was
  26.        written by Richard Stallman and Roland McGrath.  Our exam-
  27.        ples  show C programs, since they are most common, but you
  28.        can use _m_a_k_e with any programming language whose  compiler
  29.        can  be  run  with  a shell command.  In fact, _m_a_k_e is not
  30.        limited to programs.  You can use it to describe any  task
  31.        where some files must be updated automatically from others
  32.        whenever the others change.
  33.  
  34.        To prepare to use _m_a_k_e, you must write a file  called  the
  35.        _m_a_k_e_f_i_l_e  that  describes the relationships among files in
  36.        your program, and the states  the  commands  for  updating
  37.        each file.  In a program, typically the executable file is
  38.        updated from object files, which are in turn made by  com-
  39.        piling source files.
  40.  
  41.        Once a suitable makefile exists, each time you change some
  42.        source files, this simple shell command:
  43.  
  44.               mmaakkee
  45.  
  46.        suffices to perform  all  necessary  recompilations.   The
  47.        _m_a_k_e  program  uses  the  makefile data base and the last-
  48.        modification times of the files to  decide  which  of  the
  49.        files  need  to  be  updated.  For each of those files, it
  50.        issues the commands recorded in the data base.
  51.  
  52.        _m_a_k_e executes commands in the _m_a_k_e_f_i_l_e to  update  one  or
  53.        more  target _n_a_m_e_s, where _n_a_m_e is typically a program.  If
  54.        no --ff option is present, _m_a_k_e will look for the  makefiles
  55.        _G_N_U_m_a_k_e_f_i_l_e, _m_a_k_e_f_i_l_e, and _M_a_k_e_f_i_l_e, in that order.
  56.  
  57.        Normally  you should call your makefile either _m_a_k_e_f_i_l_e or
  58.        _M_a_k_e_f_i_l_e.   (We  recommend  _M_a_k_e_f_i_l_e  because  it  appears
  59.        prominently  near  the  beginning  of a directory listing,
  60.        right near other important files  such  as  _R_E_A_D_M_E.)   The
  61.  
  62.  
  63.  
  64. GNU                       22 August 1989                        1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. MAKE(1L)               LOCAL USER COMMANDS               MAKE(1L)
  71.  
  72.  
  73.        first  name  checked,  _G_N_U_m_a_k_e_f_i_l_e, is not recommended for
  74.        most makefiles.  You should use this name if  you  have  a
  75.        makefile  that  is  specific  to GNU _m_a_k_e, and will not be
  76.        understood by other versions of _m_a_k_e.  If _m_a_k_e_f_i_l_e is `-',
  77.        the standard input is read.
  78.  
  79.        _m_a_k_e  updates a target if it depends on prerequisite files
  80.        that have been modified since the target  was  last  modi-
  81.        fied, or if the target does not exist.
  82.  
  83. OOPPTTIIOONNSS
  84.        --bb
  85.  
  86.        --mm   These  options  are  ignored  for  compatibility with
  87.             other versions of _m_a_k_e.
  88.  
  89.        --CC _d_i_r
  90.             Change to directory _d_i_r before reading the  makefiles
  91.             or  doing  anything else.  If multiple --CC options are
  92.             specified, each is interpreted relative to the previ-
  93.             ous  one: --CC / --CC etc is equivalent to --CC /etc.  This
  94.             is typically used with recursive invocations of _m_a_k_e.
  95.  
  96.        --dd   Print  debugging  information  in  addition to normal
  97.             processing.  The  debugging  information  says  which
  98.             files  are being considered for remaking, which file-
  99.             times are being compared and with what results, which
  100.             files  actually  need  to  be  remade, which implicit
  101.             rules    are     considered     and     which     are
  102.             applied---everything   interesting   about  how  _m_a_k_e
  103.             decides what to do.
  104.  
  105.        --ee   Give variables taken from the environment  precedence
  106.             over variables from makefiles.
  107.  
  108.        --ff _f_i_l_e
  109.             Use _f_i_l_e as a makefile.
  110.  
  111.        --ii   Ignore  all  errors  in  commands  executed to remake
  112.             files.
  113.  
  114.        --II _d_i_r
  115.             Specifies a directory  _d_i_r  to  search  for  included
  116.             makefiles.  If several --II options are used to specify
  117.             several directories, the directories are searched  in
  118.             the  order  specified.  Unlike the arguments to other
  119.             flags of _m_a_k_e, directories given with  --II  flags  may
  120.             come  directly  after  the flag: --II_d_i_r is allowed, as
  121.             well as --II _d_i_r_.  This syntax is allowed for  compati-
  122.             bility with the C preprocessor's --II flag.
  123.  
  124.        --jj _j_o_b_s
  125.             Specifies the number of jobs (commands) to run simul-
  126.             taneously.  If there is more than one --jj option,  the
  127.  
  128.  
  129.  
  130. GNU                       22 August 1989                        2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. MAKE(1L)               LOCAL USER COMMANDS               MAKE(1L)
  137.  
  138.  
  139.             last  one  is  effective.   If the --jj option is given
  140.             without an argument, _m_a_k_e will not limit  the  number
  141.             of jobs that can run simultaneously.
  142.  
  143.        --kk   Continue  as  much as possible after an error.  While
  144.             the target that failed, and those that depend on  it,
  145.             cannot  be  remade,  the  other dependencies of these
  146.             targets can be processed all the same.
  147.  
  148.        --ll
  149.  
  150.        --ll _l_o_a_d
  151.             Specifies that  no  new  jobs  (commands)  should  be
  152.             started if there are others jobs running and the load
  153.             average is at least _l_o_a_d (a  floating-point  number).
  154.             With no argument, removes a previous load limit.
  155.  
  156.        --nn   Print the commands that would be executed, but do not
  157.             execute them.
  158.  
  159.        --oo _f_i_l_e
  160.             Do not remake the file _f_i_l_e even if it is older  than
  161.             its  dependencies,  and  do  not  remake  anything on
  162.             account of changes in _f_i_l_e.  Essentially the file  is
  163.             treated as very old and its rules are ignored.
  164.  
  165.        --pp   Print  the data base (rules and variable values) that
  166.             results from reading the makefiles; then  execute  as
  167.             usual  or  as  otherwise specified.  This also prints
  168.             the version information given by the --vv  switch  (see
  169.             below).   To  print  the  data base without trying to
  170.             remake any files, use mmaakkee --pp --ff_/_d_e_v_/_n_u_l_l_.
  171.  
  172.        --qq   ``Question mode''.  Do not run any commands, or print
  173.             anything;  just return an exit status that is zero if
  174.             the specified targets are already up to date, nonzero
  175.             otherwise.
  176.  
  177.        --rr   Eliminate  use  of the built-in implicit rules.  Also
  178.             clear out the default list  of  suffixes  for  suffix
  179.             rules.
  180.  
  181.        --ss   Silent  operation;  do not print the commands as they
  182.             are executed.
  183.  
  184.        --SS   Cancel the effect of the --kk option.   This  is  never
  185.             necessary  except  in a recursive _m_a_k_e where --kk might
  186.             be inherited from the top-level _m_a_k_e via MAKEFLAGS or
  187.             if you set --kk in MAKEFLAGS in your environment.
  188.  
  189.        --tt   Touch  files  (mark  them  up  to date without really
  190.             changing them) instead  of  running  their  commands.
  191.             This  is used to pretend that the commands were done,
  192.             in order to fool future invocations of _m_a_k_e.
  193.  
  194.  
  195.  
  196. GNU                       22 August 1989                        3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. MAKE(1L)               LOCAL USER COMMANDS               MAKE(1L)
  203.  
  204.  
  205.        --vv   Print the version of the _m_a_k_e program  plus  a  copy-
  206.             right,  a  list of authors and a notice that there is
  207.             no warranty.  After this information is printed, pro-
  208.             cessing  continues normally.  To get this information
  209.             without doing anything else, use mmaakkee --vv --ff_/_d_e_v_/_n_u_l_l_.
  210.  
  211.        --ww   Print  a  message  containing  the  working directory
  212.             before and after other processing.  This may be  use-
  213.             ful  for  tracking down errors from complicated nests
  214.             of recursive _m_a_k_e commands.
  215.  
  216.        --WW _f_i_l_e
  217.             Pretend that the target _f_i_l_e has just been  modified.
  218.             When used with the --nn flag, this shows you what would
  219.             happen if you were to modify that file.  Without  --nn,
  220.             it  is  almost the same as running a _t_o_u_c_h command on
  221.             the given file before running _m_a_k_e, except  that  the
  222.             modification  time is changed only in the imagination
  223.             of _m_a_k_e.
  224.  
  225. SSEEEE AALLSSOO
  226.        /usr/local/doc/gnumake.dvi
  227.                            _T_h_e _G_N_U _M_a_k_e _M_a_n_u_a_l
  228.  
  229. BBUUGGSS
  230.        See the chapter `Problems and Bugs' in _T_h_e _G_N_U _M_a_k_e _M_a_n_u_a_l
  231.        _.
  232.  
  233. AAUUTTHHOORR
  234.        This  manual  page contributed by Dennis Morse of Stanford
  235.        University.  It has been reworked by Roland McGrath.
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262. GNU                       22 August 1989                        4
  263.  
  264.  
  265.